/*
    Speedbump aka Project Kimbula
    Copyright (C) 2010  Ping Shin Ching

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see http://www.gnu.org/licenses.

	Ping Shin Ching
	righteous.ninja@gmail.com OR ping_sc@hotmail.com
	More information at http://www.tidytutorials.com/p/speedbump.html
 */

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include "urlfilter.h"
#include "filter.h"


UrlFilter::UrlFilter(unsigned int x){
}

int UrlFilter::InitFilter(InitInterface* fip){
	return 0;
}

int UrlFilter::DoFilter(const char * ip, FILTER_TYPE type, void* param){
	
	char *x = (char*)param;

	int retvalue=0;

	
	time_t now;

	unsigned int oldesttime;
	unsigned int oldestindex;
	
	unsigned char tip[4] ={0};

	now	= time(0);
	oldesttime = now;
	oldestindex	= -1;
	
   	if(ip==0)
		return 0;


	switch(type){
		case FILTER_START:
			retvalue=1;
			break;

		case FILTER_END:
			retvalue=1;
			break;

		case FILTER_MSG_URL:
			//flogit()<<x);
			retvalue=1;
			break;
		case FILTER_MSG_BYTES:
			//flogit()<<x);
			retvalue=1;
			break;

		case FILTER_FREE:
			//flogit()<<"Urlfilter Freeing");
			retvalue = 1;
			break;
		default:
			break;
	}

THE_END:
	return retvalue;
}
